const app=getApp();
const config=app.globalData;
Page({
  data:{
    imgurl:''
  },

  onLoad(){
    this.setData({
      imgurl:config.imgurl
    })
  },
  goLogin(){
    if(config.userInfo.phone==null){
      wx.navigateTo({
        url: '../../pages/login/index',
      })
    }else{
      wx.switchTab({
        url: '../../pages/index/index'
      })
    }
  },
  onShow(){
    let that=this
    setTimeout(function(){
      that.goLogin()
    },2000)
  },
  onReady(){}
})
